<div id="tag-btn">
     		<volist name="tags" id="vo">
     			<span class="label <eq name="vo.check" value="0">label-info</eq> <eq name="vo.check" value="1">label-success</eq> label-md" for="tag_input_{$vo['id']}" tag-id="{$vo['id']}" tag-name="{$vo['tag_name']}" check="{$vo['check']}">
		    		{$vo['tag_name']}
		  		</span>
     		</volist>
		</div>
<script>
$(function(){
	$('#tag-btn').find('span').each(function(){
		
		$(this).on('click',function(){
			if($(this).attr('check')==0){
				$(this).removeClass('label-info');
				$(this).addClass('label-success');
				$(this).attr('check',1);
				selectTag($(this).attr('tag-id'),$(this).attr('tag-name'),$(this).attr('tag-id'));
				//$('#select_tag').after("<span id='tag_input_"+$(this).attr('tag-id')+"' class='tag label label-info label-md'>"+"<a class='close' href='javascript:void(0);' onclick='delTag(this);'>x</a>"+$(this).attr('tag-name')+"<input type='checkbox' checked='checked' name='tag[]' value='"+$(this).attr('tag-id')+"'>"+"</span>")						
			}
			
			
			$(this).removeClass('label-info');
			$(this).addClass('label-success');
			
			
		});
	});
});
</script>